+Tue Feb 2 12:39:42 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c: Make sure we set the icon window position
+ before it is shown to prevent annoying flicking to 0,0.
+ Make it consistent that info->cur_x/y do not include
+ info->hot_x/y displacement.
+
+Tue Feb 2 11:06:02 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_style_set): Fixes
+ to account for the changed structure of the windows
+ of range widgets.
+
Tue Feb 2 08:59:16 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: new sections on Layout and
+Tue Feb 2 12:39:42 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c: Make sure we set the icon window position
+ before it is shown to prevent annoying flicking to 0,0.
+ Make it consistent that info->cur_x/y do not include
+ info->hot_x/y displacement.
+
+Tue Feb 2 11:06:02 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_style_set): Fixes
+ to account for the changed structure of the windows
+ of range widgets.
+
Tue Feb 2 08:59:16 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: new sections on Layout and
+Tue Feb 2 12:39:42 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c: Make sure we set the icon window position
+ before it is shown to prevent annoying flicking to 0,0.
+ Make it consistent that info->cur_x/y do not include
+ info->hot_x/y displacement.
+
+Tue Feb 2 11:06:02 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_style_set): Fixes
+ to account for the changed structure of the windows
+ of range widgets.
+
Tue Feb 2 08:59:16 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: new sections on Layout and
+Tue Feb 2 12:39:42 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c: Make sure we set the icon window position
+ before it is shown to prevent annoying flicking to 0,0.
+ Make it consistent that info->cur_x/y do not include
+ info->hot_x/y displacement.
+
+Tue Feb 2 11:06:02 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_style_set): Fixes
+ to account for the changed structure of the windows
+ of range widgets.
+
Tue Feb 2 08:59:16 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: new sections on Layout and
+Tue Feb 2 12:39:42 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c: Make sure we set the icon window position
+ before it is shown to prevent annoying flicking to 0,0.
+ Make it consistent that info->cur_x/y do not include
+ info->hot_x/y displacement.
+
+Tue Feb 2 11:06:02 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_style_set): Fixes
+ to account for the changed structure of the windows
+ of range widgets.
+
Tue Feb 2 08:59:16 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: new sections on Layout and
+Tue Feb 2 12:39:42 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c: Make sure we set the icon window position
+ before it is shown to prevent annoying flicking to 0,0.
+ Make it consistent that info->cur_x/y do not include
+ info->hot_x/y displacement.
+
+Tue Feb 2 11:06:02 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_style_set): Fixes
+ to account for the changed structure of the windows
+ of range widgets.
+
Tue Feb 2 08:59:16 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: new sections on Layout and
+Tue Feb 2 12:39:42 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c: Make sure we set the icon window position
+ before it is shown to prevent annoying flicking to 0,0.
+ Make it consistent that info->cur_x/y do not include
+ info->hot_x/y displacement.
+
+Tue Feb 2 11:06:02 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_style_set): Fixes
+ to account for the changed structure of the windows
+ of range widgets.
+
Tue Feb 2 08:59:16 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: new sections on Layout and
if (event)
info->cursor = gtk_drag_get_cursor (suggested_action);
+ /* Set cur_x, cur_y here so if the "drag_begin" signal shows
+ * the drag icon, it will be in the right place
+ */
+ if (event->type == GDK_MOTION_NOTIFY)
+ {
+ info->cur_x = event->motion.x_root;
+ info->cur_y = event->motion.y_root;
+ }
+ else
+ {
+ gint x, y;
+ gdk_window_get_pointer (GDK_ROOT_PARENT(), &x, &y, NULL);
+
+ info->cur_x = x;
+ info->cur_y = y;
+ }
+
gtk_signal_emit_by_name (GTK_OBJECT (widget), "drag_begin",
info->context);
if (event->type == GDK_MOTION_NOTIFY)
gtk_drag_motion_cb (info->ipc_widget, (GdkEventMotion *)event, info);
- else
- {
- gint x, y;
- gdk_window_get_pointer (GDK_ROOT_PARENT(), &x, &y, NULL);
-
- info->cur_x = x;
- info->cur_y = y;
-
- if (info->icon_window)
- {
- gdk_window_raise (info->icon_window->window);
- gtk_widget_set_uposition (info->icon_window, x - info->hot_x, y - info->hot_y);
- }
- }
info->start_x = info->cur_x;
info->start_y = info->cur_y;
gtk_drag_remove_icon (info);
info->icon_window = widget;
+ info->hot_x = hot_x;
+ info->hot_y = hot_y;
+
if (widget)
{
- gtk_widget_set_uposition (widget, info->cur_x, info->cur_y);
+ gtk_widget_set_uposition (widget,
+ info->cur_x - info->hot_x,
+ info->cur_y - info->hot_y);
gtk_widget_ref (widget);
gdk_window_raise (widget->window);
gtk_widget_show (widget);
}
-
- info->hot_x = hot_x;
- info->hot_y = hot_y;
}
/*************************************************************
y = (anim->info->start_y * (anim->step + 1) +
anim->info->cur_y * (anim->n_steps - anim->step - 1)) / anim->n_steps;
if (anim->info->icon_window)
- gtk_widget_set_uposition (anim->info->icon_window, x, y);
+ gtk_widget_set_uposition (anim->info->icon_window,
+ x - anim->info->hot_x,
+ y - anim->info->hot_y);
anim->step++;
info->possible_actions,
&action, &possible_actions);
- info->cur_x = event->x_root - info->hot_x;
- info->cur_y = event->y_root - info->hot_y;
+ info->cur_x = event->x_root;
+ info->cur_y = event->y_root;
if (info->icon_window)
{
gdk_window_raise (info->icon_window->window);
- gtk_widget_set_uposition (info->icon_window, info->cur_x, info->cur_y);
+ gtk_widget_set_uposition (info->icon_window,
+ info->cur_x - info->hot_x,
+ info->cur_y - info->hot_y);
window = info->icon_window->window;
}